﻿#region Usings

using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using XPressify.Data;

#endregion

namespace XPressify.Models
{
    public class ThreadListModel
    {
        public Guid Id { get; set; }
        
        [Display(Name = "Subject")]
        public string Subject { get; set; }

        [Required]
        [Display(Name = "Creator")]
        public User LastMessageUser { get; set; }
        public string ProfilePicturePath { get; set; }
        public DateTime LastMessageCreated { get; set; }
        public string LastMessageBody { get; set; }
        public bool IsRead { get; set; }
    }


    public class ThreadCreateModel
    {
        [Required]
        [Display(Name = "Subject")]
        public string Subject { get; set; }

        [Required]
        [Display(Name = "Message")]
        public string Message { get; set; }

        public Participant[] Participants { get; set; }

        public Guid CurrentUserId { get; set; }

        [Required]
        public IEnumerable<Guid> UsersSelected { get; set; }
    }

    public class ThreadDeleteModel
    {
        public Guid Id { get; set; }
    }

    public class ThreadSendEmailModel
    {
        public Guid ThreadId { get; set; }

        public User Receiver { get; set; }

        public string Subject { get; set; }

        public string MessageBody { get; set; }

        public string Sender { get; set; }

        public DateTime Created { get; set; }
    }

    public class SelectParticipantsModel
    {
        public Thread Thread { get; set; }
        public Participant[] AllFriends { get; set; }
    }

    public class Participant
    {
        public Guid Id { get; set; }

        public string FullName { get; set; }

        public bool Selected { get; set; }

        public string ProfilePicturePath { get; set; }
    }
}